import request from '../../utils/request.js'

//获取课程列表
export const getCourseAPI=(params)=>{
  return request({
    url:'/teacher/courses',
    method:'get',
    params:params
  })
}
//新增课程
export const createCourseAPI=(params)=>{
  return request({
    url:'/teacher/courses/push',
    method:'post',
    data:params
  })
}
//根据id获取课程详情
export const getUpdateCourseInfoAPI=(id)=>{
  return request({
    url:'/teacher/courses/id',
    method:'get',
    params:{
      id:id
    }
  })
}
//提交修改的课程信息
export const submitUpdateCourseAPI=(params)=>{
  return request({
    url:'/teacher/courses',
    method:'put',
    data:params
  })
}